//
const cookie = require("../../utils/cookie");
//
module.exports = {
    path:"/",
    "GET /":function(req,res,next){
        //console.log(req);
        res.send("Hello,ZhaZhaHui!!!");
        next();
    },
    "GET /test":[
        (req,res,next)=>{
            if(!req.cookies.userInfo){
                cookie.setCookie.call(res,"userInfo",JSON.stringify({
                    name:"LBJ",
                    age:36
                }),{
                    maxAge:10000
                });
            }
            console.log(req.query);
            next();
        },
        (req,res,next)=>{
            console.log(req.cookies);
            res.send("[function(){},function(){}]");
        }
    ]
};